#!/bin/bash

#在当前目录以docker形式创建gitlab

SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd)
cd $SCRIPT_DIR

echo $SCRIPT_DIR

#mkdir -p mnt/gitlab/etc
#mkdir -p mnt/gitlab/log
#mkdir -p mnt/gitlab/data

docker run \
    -d  \
    -p 8443:443 \
    -p 880:80 \
    -p 822:22 \
    --name gitlab \
    --restart unless-stopped \
    -v /home/gitlab/config:/etc/gitlab \
    -v /home/gitlab/logs:/var/log/gitlab \
    -v /home/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce
